Announcement

Collapse
No announcement yet.

Some images can`t be uploaded

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Some images can`t be uploaded

    Hi,
    I have an entity, where I need to upload associated images, what worked completely correct so far. Yesterday I suddenly had the problem, that I was not able to upload some images. I edited the images again, changed the image format from jpg to png, but still these images are impossible to upload. The error code in legs-file:

    Code:
    [2021-12-10 07:26:12] ERROR: (500) GET /; line: 225, file: G:\laragon\www\design\application\Espo\EntryPoints\Image.php [] []
    Any idea?

  • #2
    you can configure the field of image on your entity to accept more custom type of images and increase file size to make sure system will upload them.
    Rabii
    Web Dev

    Comment


    • #3
      Thank you for the hint, but it is not because of file type or size. I have already about 500 records, all with the same file type (jpg) and the size is in the lower kb range. And it started to happen recently with the images of two records.
      I am still not sure, if it has to do with espoCRM, because the images, that I try to upload will not show in all editors. They open in Photoshop and Affinity Photo, but not in Windows Paint or other smaller applications. I already saved the images again, tried another file type, but no difference.
      Only I do not know, what could be wrong with these images, bacause on another website (Joomla) they appear correctly.

      Comment


      • #4
        line 225 :

        if (!is_array(getimagesize($filePath))) {
        throw new Error();
        }

        height-width

        - try resize image to lower before upload
        - comment above and see what's append
        - try lower quality

        Comment


        • #5
          This gets really confusing:

          1. Changed the size to smaller -> did not work either
          2. Lowered the quality -> did not work either
          3. Displayed the image, that I have on the website, made a screenshot, saved as jpg and tried to upload -> did not work either
          4. Deleted the record, created a new one -> did not work either

          As already said, I have lots of images in more than 500 record, but in two records I cannot upload images. And these two records were not the two last ones I created. After the misfunctioning record I was able to create another one with different images, which worked.

          One more thing: I cannot download the image with filezilla from the website`s image folder, but I can click edit in filezilla and the image opens in my image editor (i.e. it downloads).

          Considering all these issues I think it is a problem with the image. But I don`t get, what it could be....???

          Comment


          • item
            item commented
            Editing a comment
            when you think there is no solution, one solution come..
            take a print-screen of image.. and upload it

            certainly something bad in the image... maybe "full resolution dpi.. corrupt..." and php don't understand it

          • shalmaxb
            shalmaxb commented
            Editing a comment
            @item: did exactly that, see 3.

        • #6
          It works now.

          Before I always inserted the images by drag and drop. Only today I did it the "normal" way by choosing the file and that worked. I don`t know, why drag and drop (what I always use) did not work in these cases.

          Comment

          Working...
          X